package com.woniu.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.pojo.Book;
import com.woniu.pojo.BookType;
import com.woniu.service.BookTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping(value = "/bookType")
@Api(tags = "书籍分类")
public class BookTypeController {
    @Autowired
    private BookTypeService bookTypeService;

    /**
     * 查询所有书籍
     * */
    @GetMapping("/findAll")
    @ApiOperation(value = "查询所有书籍分类")
    public ResponseEntity<List<BookType>> findAll() {
        log.info("查询所有书籍分类");
        List<BookType> bookTypes = bookTypeService.findAll();
        return ResponseEntity.ok(bookTypes);
    }







}
